<p><?php echo $this -> Html -> link('Users', array('controller' => 'users', 'action' => 'index')); ?></p>

<?php
echo $this -> Form -> create('Faculty', array('action' => 'add'));
echo $this -> Form -> input('name');
echo $this -> Form -> end('Add faculty');
?>

<table>
	<tr>
		<th> ID </th>
		<th> Name </th>
		<th style="text-align: center"></th>
		<th style="text-align: center"></th>
	</tr>

	<?php foreach ($faculties as $faculty):
	?>

	<tr>
		<td><?php echo $faculty['Faculty']['id_faculty']; ?></td>
		<td><?php echo $faculty['Faculty']['name']; ?></td>
		<td style='text-align: center'><?php echo $this -> Html -> link($this -> Html -> image("admin/edit.png", array("alt" => "edit")), array('controller' => 'faculties', 'action' => 'edit', $faculty['Faculty']['id_faculty']), array('escape' => false)); ?> </td>
		<td style='text-align: center'><?php echo $this -> Form -> postLink($this -> Html -> image("admin/delete.gif", array("alt" => "delete")), array('action' => 'delete', $faculty['Faculty']['id_faculty']), array('escape' => false, 'confirm' => 'Are you sure?\nAll the releted students will be deleted.')); ?> </td>

	</tr>
	<?php endforeach; ?>
</table>
